import request from '@/utils/request'

export default {
  getTeacherListPage(current,limit,teacherQuery) {
    return request({
    //   url: '/table/list',
      url: `/eduservice/teacher/pageTeacherCondition/${current}/${limit}`,
      method: 'post',
    //   后端用的是requestBody 所以这用data data就是把数据传递用json
    data: teacherQuery
    })
  },
  deleteTeacherById(id){
    return request({
      url: `/eduservice/teacher/${id}`,
      method: 'delete'
    })
  },
  //添加讲师
  addTeacher(teacher){
    return request({
      url: `/eduservice/teacher/addTeacher`,
      method: 'post',
      data: teacher
    })
  },
  //修改  先查再改
  getTeacherInfo(id){
    return request({
      url: `/eduservice/teacher/getTeacher/${id}`,
      method: 'get'
    })
  },
  //改
  updateTeacherInfo(teacher){
    return request({
      url: `/eduservice/teacher/updateTeacher`,
      method: 'post',
      data: teacher
    })
  }

}
